<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css" />
	</head>

	<body>
		{include file='../Common/hy_header.html'}
		<div class="am-g">
			<div class="am-tabs am-margin" data-am-tabs="">
				<ul class="am-tabs-nav am-nav am-nav-tabs">
					<li class="am-active"><a hidefocus="true" href="#tab1">基本详情</a>
					</li>
					<li class=""><a hidefocus="true" href="#tab3">SEO 选项</a>
					</li>
				</ul>

				<form class="am-tabs-bd am-form hy-js-form" style="touch-action: pan-y; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">

					<div class="am-tab-panel am-fade am-active am-in" id="tab1">
						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">打开方式</div>
							<div class="am-u-sm-10">
								<div class="am-btn-group hy-js-menutab" data-am-button="">
									<label data-target='#link1' class="hy-js-menubtn am-btn am-btn-default am-btn-xs {if $menu.is_extend_links}{if $menu.is_extend_links eq 0}am-active {else}{/if}{else}am-active {/if}">
										<input type="radio" {if $menu.is_extend_links}{if $menu.is_extend_links eq 0}checked="checked" {else}{/if}{else}checked="checked" {/if} name="is_extend_links" value="0" id="option1">内链
									</label>
									<label data-target='#link2' class="hy-js-menubtn am-btn am-btn-default am-btn-xs{if $menu.is_extend_links eq 1} am-active {else}{/if}">
										<input type="radio" name="is_extend_links" {if $menu.is_extend_links eq 1}checked="checked" {else}{/if} value="1" id="option2"> 外链
									</label>
								</div>
							</div>
						</div>
						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">
								栏目标题
							</div>
							<div class="am-u-sm-4 am-u-end">
								<input type="text" name="name" value="{$menu.name}" class="am-input-sm">
							</div>
						</div>

						{if $_C.DIGLOSSIA==1}
						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">
								英文标题
							</div>
							<div class="am-u-sm-4 am-u-end">
								<input type="text" name="en_name" value="{$menu.en_name}" class="am-input-sm">
							</div>
						</div>
						{/if}
						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">
								栏目别名
							</div>
							<div class="am-u-sm-4 am-u-end">
								<input type="text" name="code" value="{$menu.code}" placeholder="必填，作为唯一识别栏目，例如填写:index" class="am-input-sm">
							</div>
						</div>

						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">父级栏目</div>
							<div class="am-u-sm-4 am-u-end">
								<select name="parent_id">
									{foreach from=$parent_list item=list}
									<option {if $menu.parent_id==$list.id} selected="selected" {/if} value="{$list.id}">{$list.name}</option>
									{/foreach}
								</select>
							</div>
						</div>

						<div id='link2' {if $menu.is_extend_links eq 1}style='display: block;'{else}{/if}  class="am-g am-margin-top hy-js-menupanel hy-hide">
							<div class="am-u-sm-2 am-text-right">
								链接
							</div>
							<div class="am-u-sm-4 am-u-end">
								<input type="text" name="redirect_url" {if $menu.redirect_url} value="{$menu.redirect_url}" {else} value="http://"{/if} class="am-input-sm">
							</div>
						</div>

						<div id='link1' {if $menu.is_extend_links}{if $menu.is_extend_links eq 0}style='display: block;'{else}{/if}{else}style='display: block;'{/if} class="am-g am-margin-top hy-js-menupanel hy-hide">
							<div class="am-u-sm-2 am-text-right">栏目类型</div>
							<div class="am-u-sm-4 am-u-end">
								<select name="type">
									<option {if $menu.type==1} selected="selected" {/if} value="1">文章模块</option>
									<option {if $menu.type==2} selected="selected" {/if} value="2">相册模块</option>
									<option {if $menu.type==3} selected="selected" {/if} value="3">图文模块</option>
								</select>
							</div>
						</div>

						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">
								上传图片
							</div>
							<div class="am-u-sm-4">
								<input type="text" name="thumb" class="am-input-sm" value="{$menu.thumb}">

							</div>
							<div class="am-u-sm-1">
								<img id="hy-thumb" style="height: 30px;" {if $menu.thumb}src="{$menu.thumb}" {else} src="{$_C.hy_path}images/logo2.png" {/if}>
							</div>
							<div class="am-u-sm-4 am-u-end">
								<button class="am-btn am-btn-primary am-btn-xs hy-js-uploadimg">上传</button>
							</div>
						</div>
						<div class="am-g am-margin-top">
							<div class="am-u-sm-2 am-text-right">{$_L['IS_NAV']}</div>
							<div class="am-u-sm-10">
								<div class="am-btn-group" data-am-button="">
									<label class="am-btn am-btn-default am-btn-xs am-active">
										<input type="radio" {if $art.is_show}{if $art.is_show eq 0}checked="checked" {else}{/if}{else}checked="checked" {/if} name="is_show" value="1" id="option1"> 显示
									</label>
									<label class="am-btn am-btn-default am-btn-xs">
										<input type="radio" {if $art.is_show}{if $art.is_show eq 1}checked="checked" {else}{/if}{else}{/if} name="is_show" value="0" id="option2"> 不显示
									</label>
								</div>
							</div>
						</div>
					</div>

					<div class="am-tab-panel am-fade" id="tab3">
						<div class="am-g am-margin-top-sm">
							<div class="am-u-sm-2 am-text-right">
								SEO 标题
							</div>
							<div class="am-u-sm-4 am-u-end">
								<input type="text" name="page_title" value="{$menu.page_title}" class="am-input-sm">
							</div>
						</div>

						<div class="am-g am-margin-top-sm">
							<div class="am-u-sm-2 am-text-right">
								SEO 关键字
							</div>
							<div class="am-u-sm-4 am-u-end">
								<input name="keywords" value="{$menu.keywords}" type="text" class="am-input-sm">
							</div>
						</div>

						<div class="am-g am-margin-top-sm">
							<div class="am-u-sm-2 am-text-right">
								SEO 描述
							</div>
							<div class="am-u-sm-4 am-u-end">
								<textarea name="description" rows="4">{$menu.description}</textarea>
							</div>
						</div>
					</div>
					<input type="hidden" name="id" value="{$id}" />
				</form>
				<div class="am-margin">
					<button type="button" class="am-btn am-btn-primary hy-js-submit am-btn-xs">提交保存</button>
				</div>
			</div>
		</div>
		<div class="hy-footer">

		</div>
		{include file='../Common/hy_footer.html'}
		<script type="text/javascript" src="{$_C.hy_path}js/editor/kindeditor.js"></script>
		<script type="text/javascript">
			hy_uploadimg('/menu', {}, function(result) {
				if (typeof(result[0]) != 'undefined') {
					$('#hy-thumb').attr('src', result[0]);
					$('input[name=thumb]').val(result[0]).focus();
				}
			})
			 hy_submit('index.php?g=admin&m=menu&a={$action}');
		</script>
	</body>

</html>